﻿#pragma once

// 图片控件
class PictureCtrl: public CWnd {
    DECLARE_MESSAGE_MAP()

    private: BOOL mHasBorder;           // 有边框则为 TRUE，否则为 FALSE
    private: UINT mId;                  // id
    private: CBitmap mImage;            // 图片
    private: CDC mImageDC;              // 图片保存者
    private: CPoint mOriginalPosition;  // 原位置，即刚被创建时的初始位置

    public: PictureCtrl(BOOL, UINT, CDC*, CWnd*, CRect*);
    public: void GetPosition(CPoint*);
    public: BOOL IsOnOriginalPosition();
    private: afx_msg void OnLButtonUp(UINT, CPoint);
    private: afx_msg void OnPaint();
    public: void SetBorder(BOOL);
};
